FROM node:15
WORKDIR /tracwb
# set timezone
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' > /etc/timezone

# RUN npm set registry https://registry.npm.taobao.org
# cache step
COPY package.json /tracwb/package.json
RUN npm i --registry https://registry.npm.taobao.org
# build
COPY ./ /tracwb

# bootstrap set port
EXPOSE 7001

CMD ["npm", "start"]
